package com.glasses.abc.business;

import java.util.ArrayList;
import java.util.List;

/**
 *
 * @author Jean-Luc Burot
 * @since 2014-09-13
 */
public class ReportMenuItem {
    private long id;
    private String label;
    private List<ReportMenuItem> subMenuItemList;
    
    public long getId() {
        return this.id;
    }
    
    public final void setId(long id) {
        this.id = id;
    }
    
    public final String getLabel() {
        return this.label;
    }
    
    public final void setLabel(String label) {
        this.label = label;
    }
    
    public final List<ReportMenuItem> getSubMenuItemList() {
        if (this.subMenuItemList == null)
            this.subMenuItemList = new ArrayList<>();
        
        return this.subMenuItemList;
    }
    
    public final void addSubMenuItem(ReportMenuItem subMenuItem) {
        if (this.subMenuItemList == null)
            this.subMenuItemList = new ArrayList<>();
        
        this.subMenuItemList.add(subMenuItem);
    }
    
    public final void setSubMenuItemList(List<ReportMenuItem> subMenuItemList) {
        if (this.subMenuItemList == null)
            this.subMenuItemList = new ArrayList<>();
        
        this.subMenuItemList = subMenuItemList;
    }
    
    public ReportMenuItem(long id, String label) {
        this.setId(id);
        this.setLabel(label);
    }
}
